package com.yckj.day02;

/**
 * TODO 关系运算符和逻辑运算符
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/17 11:28
 */
public class Demo4 {
    public static void main(String[] args) {
        // 比较运算符
        boolean flag1 = 87 > 23;
        System.out.println("flag1 = " + flag1);
        boolean flag2 = 78 == 78;
        boolean flag3 = 78 != 78;
        System.out.println(flag2+","+flag3);
        // 逻辑运算符
        boolean b1 = 89 <= 30 && 56 > 10;
        System.out.println(b1);
        int a = 34;
        int b = 20;
        boolean b2 = a++ < b-- & ++a != ++b;
        System.out.println("b2 = " + b2);
        System.out.println(a+","+b);

        boolean c = ++a > b++ || --a >= b--;
        System.out.println("c = " + c);
        System.out.println(a+","+b);

    }
}
